<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
    <head>
        <title>职位管理</title>
        <meta http-equiv="content-type" content="text/html;charset=utf-8">
        <link href="../../css/mine.css" type="text/css" rel="stylesheet">
    </head>

    <body>

        <div class="div_head">
            <span>
                <span style="float:left">当前位置是：-》职位管理</span>
                <span style="float:right;margin-right: 8px;font-weight: bold">
                    <a style="text-decoration: none" href="list.jsp">【返回】</a>
                </span>
            </span>
        </div>
        <div></div>

        <div style="font-size: 13px;margin: 10px 5px">
            <form action="/role/update" method="post" >
                <%--隐藏域：上传后台需要的角色id--%>
                    <input type="hidden" name="id" value="${role.id}" />
            <table border="1" width="100%" class="table_a">
                <tr>
                    <td>职位编码<span style="color:red">*</span>：</td>
                    <td>
                       <input type="text" name="permid" value="${role.permid}" />
                    </td>
                </tr>
               
                <tr>
                    <td>职位名称<span style="color:red">*</span>：</td>
                    <td><input type="text" name="permname" value="${role.permname}" /> </td>
                </tr>
                <tr>
                    <td>职位分类<span style="color:red">*</span>：</td>
                    <td>
						<select name="permselect">
							<option value="1" ${role.permselect eq 1?"selected":""}>管理</option>
							<option value="2" ${role.permselect eq 2?"selected":""}>技术</option>
							<option value="3" ${role.permselect eq 3?"selected":""}>领导</option>
						</select>
					</td>
                </tr>
                <tr>
                    <td>所属部门<span style="color:red">*</span>：</td>
                    <td>

						 <select name="permappartment">
                             <c:forEach items="${deptList}" var="dept">
                                 <option value="${dept.id }" ${dept.id eq role.permappartment?"selected":""}>${dept.appartmentfullname}</option>
                             </c:forEach>
						</select>
                    </td>
                </tr>
				
				<tr>
                    <td>菜单权限<span style="color:red">*</span>：</td>
                    <td>
                        <c:forEach items="${menuList}" var="menu">

                            <input type="checkbox" name="mids" value="${menu.mid}"
                            <c:forEach items="${role.mids}" var="mid">
                                ${mid eq menu.mid?"checked":""}
                            </c:forEach>
                            />
                            ${menu.menuName}<br/>
                            <c:forEach items="${menu.secondMenu}" var="menu2">
                                &nbsp;&nbsp;&nbsp;<input type="checkbox" name="mids" value="${menu2.mid}"
                                <c:forEach items="${role.mids}" var="mid">
                                    ${mid eq menu2.mid?"checked":""}
                                </c:forEach>
                                />${menu2.menuName}<br/>
                            </c:forEach>
                        </c:forEach>

						 
                    </td>
                </tr>


				<tr>
                    <td>职位描述<span style="color:red">*</span>：</td>
                    <td>
                        <textarea name="perminfo" >${role.perminfo}</textarea>
                    </td>                
                </tr>

				<tr>
                    <td>备       注：</td>
                    <td>
                        <textarea name="permdes">${role.permdes}</textarea>
                    </td>                
                </tr>
				<tr>
                    <td>是否启用：</td>
                    <td>
                        <select name="used">
							<option value="1" ${role.used eq 1?"selected":""}>是</option>
							<option value="0" ${role.used eq 0?"selected":""}>否</option>
						</select>
                    </td>                
                </tr>
				
                <tr>
                    <td colspan="2" align="center">
                        <input type="submit" value="添加">
						<input type="reset" value="清空">
                    </td>
                </tr>  
            </table>
            </form>
        </div>
    </body>
</html>